﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

namespace GrayParrot.Web.Formly
{
    public class AddOn
    {
        /// <summary>
        /// Gets or sets the text...
        /// </summary>
        /// <value>
        /// The text.
        /// </value>
        [JsonProperty(PropertyName = "text")]
        public string Text { get; set; }

        /// <summary>
        /// Gets or sets the class...
        /// </summary>
        /// <value>
        /// The class.
        /// </value>
        [JsonProperty(PropertyName = "class")]
        public string Class { get; set; }

        /// <summary>
        /// Gets or sets the on click funtion callback...
        /// </summary>
        /// <value>
        /// The on click.
        /// </value>
        /// <remarks>
        /// Will add a cursor:pointer and an ng-click to the addon (invoked with the options and scope)
        /// </remarks>
        [JsonProperty(PropertyName = "onClick", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public string OnClick { get; set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="AddOnAttribute"/> class.
        /// </summary>
        public AddOn()
        {

        }
    }
}
